/* Copyright 2011 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package integration;

import org.junit.Before;
import org.junit.Test;

public class BootstrapIT extends AbstractCompileIT {

    @Before
	public void setUp() throws Exception {
    	super.setUp();
    	// bootstrap has not yet been upgraded to less 1.2.2, so use 1.2.1
    	lessCompiler.setLessJs(BootstrapIT.class.getClassLoader().getResource("bootstrap/less-1.2.1.js"));
    }
    
    @Test
    public void testBootstrap() throws Exception {
        testCompile("bootstrap");
    }
    
    @Test
    public void testResponsive() throws Exception {
        testCompile("responsive", "bootstrap-responsive");
    }
    
    private void testCompile(String filename) throws Exception {
        testCompile(filename, filename);
    }
    
    private void testCompile(String lessFilename, String cssFilename) throws Exception {
        testCompile(toFile("bootstrap/less/" + lessFilename + ".less"), toFile("bootstrap/css/" + cssFilename + ".css"));
    }
}
